<!--
 * @Author: 王明明834578987 10266004+wang-mingming-834578987@user.noreply.gitee.com
 * @Date: 2024-08-29 10:59:23
 * @LastEditors: 王明明834578987 10266004+wang-mingming-834578987@user.noreply.gitee.com
 * @LastEditTime: 2024-10-21 14:32:28
 * @FilePath: \ft-apply-admin\src\views\applicationDetails\Modals\RBModal.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
  <BasicModal :show="show" :title="props.title" width="30%" :widthComfirm="true"
   :showFooter="!hasRecommend" @comfirm="confirm"
    @closeModal="show = false">
    <template #content>
      <div class="flex flex-col items-center justify-center color-#333">
        <img class="w-46px" :src="getImageUrl('warning.png', 'applicationDetail')" alt="">
        <p class="font-size-16px mt-18px">{{ notice.p1 }}</p>
        <p class="font-size-14px">{{ notice.p2 }}</p>
      </div>
    </template>
  </BasicModal>
</template>




<script setup lang='ts'>
import BasicModal from "@/views/ApplicationDetails/Modals/BasicModal.vue";
import { getImageUrl } from "@/assets/common/common.ts";
import { ref, defineEmits } from "vue";
const props = defineProps(['title'])
const show = ref<boolean>(false);
const hasRecommend = ref<boolean>(false)
const notice = ref<{ p1: string, p2: string }>({
  p1: "是否确认提交考核评价？",
  p2: "提交后不可修改"
})
const showDialog = async (is) => {
  hasRecommend.value = is
  if (is) {
    notice.value = {
      p1: "您已完成评价",
      p2: "请等待其他考核官完成评价"
    }
  } else {
    notice.value = {
      p1: "是否确认提交考核评价？",
      p2: "提交后不可修改"
    }
  }
  show.value = true
}
const emit = defineEmits(['confirm'])
const confirm = () => {
  emit('confirm', hasRecommend.value)
}
const closeModal = () => {
  show.value = false
}
defineExpose({
  showDialog,
  closeModal
})
</script>

<style lang="less" scoped></style>
